package com.fr.fs.web.service;

import com.fr.fs.control.DepartmentControl;
import com.fr.fs.control.UserControl;
import com.fr.fs.web.NoPrivilegeException;
import com.fr.web.core.ActionNoSessionCMD;
import com.fr.web.utils.WebUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class FSSetAuthRemoveDepartAction extends ActionNoSessionCMD
{
  public void actionCMD(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse)
    throws Exception
  {
    long l = ServiceUtils.getCurrentUserID(paramHttpServletRequest);
    if (!UserControl.getInstance().hasModulePrivilege(l, 3L))
      throw new NoPrivilegeException();
    DepartmentControl.getInstance().deleteDepartment(new Long(WebUtils.getHTTPRequestParameter(paramHttpServletRequest, "id")));
  }

  public String getCMD()
  {
    return "auth_removedepart";
  }
}

